import { get, post } from '../http'

const manager = {
  // 查询商品库存信息
  getGoodsList (query) {
    return get('/goods/queryList', query)
  },
  // 修改商品库存信息
  discGood (params) {
    return post('/goods/update', params)
  },
  // 查询库存预警列表(商家补货提醒)
  adviceGoodsList (query) {
    return get('/inventoryWarning/queryList', query)
  },
  // 添加商品采购订单
  addPurchase (params) {
    return post('/purchaseOrder/add', params)
  },
  // 修改采购订单
  discPurchase (params) {
    return post('/purchaseOrder/update', params)
  },
  // 删除采购订单
  deletePurchase (params) {
    return post('/purchaseOrder/del', params)
  },
  // 查询采购订单列表
  purchaseList (query) {
    return get('/purchaseOrder/queryList', query)
  },
  // 生成入库单(立即采购)
  godownEntryAdd (params) {
    return post('/godownEntry/add', params)
  },
  // 查询未处理的入库单列表
  godownEntryList (query) {
    return get('/godownEntry/queryList', query)
  },
  // 立即入库
  godownEntryNow (params) {
    return post('/godownEntry/warehousing', params)
  }
}

export default manager
